﻿using BW.WMS.Domain.Entities;
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BW.WMS.Infrastructure.Data.Contexts
{
    /// <summary>
    /// 数据库上下文
    /// </summary>
    public class DBContext
    {
        private readonly string _connectionString;
        public DBContext(string connectionString) 
        {
            _connectionString = connectionString;
        }

        //public IDbConnection GetConn()
        //{
        //    return new DmConnection(_connectionString);
        //}

        public IDbConnection GetConn()
        {
            return new MySqlConnection(_connectionString);
        }
    }
}
